<?  layout("../layout/default.html") { ?>
<div class="admin-panel">
	<div class="tab">
		<div class="tab-head">
			<strong><? if(@data.isNew()){ ?>添加<? }else{ ?>编辑<?} ?></strong>
			<span class="tab-more"><a href="javascript:history.go(-1)" class="button  button-little bg-blue  icon-step-backward"> 返回</a></span>
			<ul class="tab-nav">
			  <li class="active"><a href="#tab-set">信息</a></li>
			</ul>
		</div>
		<div class="tab-body">
		<script type="text/javascript">
			function check(){
					var str1 = document.getElementById("messagetype_msgtypename").value;
					var str2 = document.getElementById("messagetype_field").value;
					var reg=/[^\u4E00-\u9FA5]/;
					if(str1.match(reg)){
						alert("请输入消息名称");
						document.getElementById("messagetype_msgtypename").value="";
						return false;
					}
					if(str2.match(reg)){
						alert("请输入消息模板");
						document.getElementById("messagetype_field").value="";
						return false;
					}
			}
		</script>
			<div class="tab-panel active" id="tab-set">
				<form method="post" class="form-x" action="">
					<div class="form-group">
						<div class="label"><label for="sitename">消息名称</label></div>
						<div class="field">
						<input type="text" class="input" id="messagetype_msgtypename" name="messagetype.msgtypename" size="200" placeholder="请填写消息名称" data-validate="required:请填写消息名称" value="${data.msgtypename!""}"/>
						</div>
					</div>
					<div class="form-group">
						<div class="label"><label for="sitename">消息模板</label></div>
						<div class="field">
						<textarea class="textarea" id="messagetype_field" name="messagetype.field" placeholder="请填写消息模板" data-validate="required:请填写消息模板" value="${data.field!""}"></textarea>
						</div>
					</div>
					<div class="form-group">
				<div class="form-button"><button class="button bg-main" type="submit" onclick="return check()">提交</button></div>
			    </form>
			</div>
		</div>
	</div>
</div>
<?  } ?>			